Field of the Invention
The present invention relates to an image-processing apparatus.
Priority is claimed on Japanese Patent Application No. 2015-008481, filed on Jan. 20, 2015, the content of which is incorporated herein by reference.
Description of Related Art
An image is divided into a plurality of regions each having any size, and positions corresponding to regions between a plurality of different images are determined based on motion vector information to perform image processing. Thus, there is a method of segmenting partial image data of a rectangular region from image data to transfer the segmented partial image data when the image data is transferred from a memory storing the image data to an image-processing block. To speed up processing necessary for this transfer, a method of reducing the number of transferring actions is disclosed in the publication of Japanese Unexamined Patent Application, First Publication No. 2004-127093. In a method disclosed in the publication of Japanese Unexamined Patent Application, First Publication No. 2004-127093, a portion of data of continuous addresses from a 1st address (an address of data of an upper-left corner of a rectangular region) of partial image data of the rectangular region to a last address (an address of data of a lower-right corner of the rectangular region) in a memory is read.
When data of one row of the rectangular region is transferred in the above-described method, data may be read from the memory over a boundary of data capable of being accessed through one access to the memory. Hereinafter, the boundary of the data capable of being accessed through the one access is referred to as an access boundary.
FIGS. 12 and 13 illustrate a state of image data stored in the memory. A small rectangle indicates a pixel. In FIGS. 12 and 13, an amount of data of one pixel is 8 bits. An amount of data capable of being accessed through the one access to the memory is 32 bits. That is, it is possible to access data of four pixels through one access to the memory and transfer the data. A boundary of a region of four pixels in a horizontal direction is an access boundary. The access boundary appears every four pixels in the horizontal direction. In FIG. 13, access boundaries B200, B201, B202, and B203 are illustrated.
In FIG. 13, partial image data IMG200 and image data IMG205 of rectangular regions are illustrated. Image data IMG200 and the image data IMG205 are constituted of data of six rows and data of each row is constituted of data of four pixels. The image data IMG200 is in contact with the access boundary B200. When data of one row of the image data IMG200 is transferred, data crossing the access boundary B200 is not read from the memory. That is, the data of each row of the image data IMG200 is read from the memory through one access to the memory. The data of each row of the image data IMG200 is transferred from the memory through one burst transfer.
The access boundary B202 is located inside the image data IMG205. That is, data of one row of the image data IMG205 is stored in the memory crossing access boundary B202. When data of one row of the image data IMG205 is transferred, data crossing the access boundary B202 is read from the memory. Thus, two accesses to the memory are necessary to transfer data of one row of the image data IMG205. Data of each row of the image data IMG205 is transferred from the memory through two burst transfers. Therefore, the number of transfers when the image data IMG205 is transferred is twice the number of transfers when the image data IMG200 is transferred.